package com.heima.behavior.controlle;

import com.heima.behavior.dto.ReadBehaviorDto;
import com.heima.behavior.service.IApReadBehaviorService;
import com.heima.common.dto.ResponseResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 20929
 */
@RestController
@Api(tags = "用户行为接口")
public class ApReadBehaviorController {
    @Autowired
    private IApReadBehaviorService iApReadBehaviorService;

    /**
     * 用户阅读记录
     *
     * @param dto dto
     * @return 通用
     */
    @PostMapping("/api/v1/read_behavior")
    public ResponseResult readBehavior(@RequestBody ReadBehaviorDto dto) {
        return iApReadBehaviorService.saveRead(dto);
    }
}
